home *** CD-ROM | disk | FTP | other *** search
- Path: fido.asd.sgi.com!austern
- From: "B. Dalton" <bdalton@xagony.ilo.dec.com>
- Newsgroups: comp.std.c++
- Subject: type_info
- Date: 17 Jan 1996 12:22:51 PST
- Organization: DEC Gaillimh
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <30FD350D.A71@xagony.ilo.dec.com>
- NNTP-Posting-Host: isolde.mti.sgi.com
- X-Original-Date: Wed, 17 Jan 1996 17:42:37 +0000
- X-Mailer: Mozilla 2.0b3 (WinNT; I)
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMP1arky4NqrwXLNJAQETJAH9EhZcPtodimqENiEQDMMuMM0Qx0N3QVg0
- JgZ4XFwFgkxiAW30ySNJg3z60FrygLnRas5ERgTrcLLn2T7oeZBWzQ==
- =IyrT
- Originator: austern@isolde.mti.sgi.com
-
- The April draft says(see
- http://www.cygnus.com/misc/wp/draft/lib-support.html#lib.support
- .rtti) about type_info::operator==
-
- bool operator==(const type_info& rhs) const;
-
- Effects:
- Compares the current object with rhs.
- Returns:
- true if the two values describe the same type.
-
- What does "same" mean here? To be specific, say we had
- ...
- class beatha{public:virtual ~beatha(){};}
- class duine:public beatha{};
- class gael: public duine {};
-
- beatha *pd=new gael;
- if(typeid(pd)==typeid(duine)
- { cout<<"duine";
- }
- ...
- does "duine" get printed here or not?
-
- --
- B. Dalton DEC - Gaillimh
- mailto:bdalton@xagony.ilo.dec.com
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
- is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
-